package sh.wn36.vehiclemanage.mapper;


import io.swagger.annotations.ApiModelProperty;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import sh.wn36.vehiclemanage.entity.QUsers;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author xk
 * @since 2021-04-26
 */
@Mapper
public interface QUsersMapper extends BaseMapper<QUsers> {
    @ApiModelProperty("根据用户id重置密码")
    @Update("UPDATE q_users SET lpass = #{pwd} WHERE id = #{id}")
    public int initPwdByid(@Param("pwd") String pwd, @Param("id") int id);
    @Select("select * from q_users where lname=#{username}")
    QUsers loginUser(String username);
    @Update("UPDATE q_users SET lpass = #{lpass} WHERE id = #{id}")
    int updatePassword(@Param("id") Integer id, @Param("lpass") String lpass);
}
